package com.bolang.onlycode.demo.question;

import java.util.Arrays;

public class MyTest {
    public static void main(String[] args) {
       Father child1= new Child1();
       Father child2= new Child2();
       Father child21= new Child2();
        child1.addLifecycleListener(1);
        child2.addLifecycleListener(2);
        child21.addLifecycleListener(3);
        System.out.println(Arrays.toString(child2.findLifecycleListeners()));
        System.out.println(Arrays.toString(child1.findLifecycleListeners()));
        System.out.println(Arrays.toString(child21.findLifecycleListeners()));
        System.out.println(child2.findLifecycleListeners());
        System.out.println(child1.findLifecycleListeners());
    }
}
